package com.csj.DesignPattern.adapter.abstractAdapter;

// ！！！继承目标类，源类通过构造函数传入
//通过实现抽象适配器，可以屏蔽掉适配器中不需要的方法
public class SDAdapterTFImpl extends SDAdapterTF{

    private TFCard tfCard;

    public SDAdapterTFImpl(TFCard tfCard) {
        super();
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        return tfCard.readTF();
    }
}

/*
public class StreamDecoder extends Reader {
    public int read() {
        char[] cb = new char[2];
        int n = read(cb, 0, 2);
    }
    public int read(char[] cbuf, int offset, int length) {
        return n + implRead(cbuf, off, off + len)
    }
    int implRead(char[] cbuf, int off, int end) throws IOException {
        int n = readBytes();
    }

    private final InputStream in;

    private int readBytes() throws IOException {
        int n = in.read(bb.array(), bb.arrayOffset() + pos, rem);
    }
}
 */